//@ts-ignore
import { hashrouter } from "./hashrouter";
import { pathrouter } from "./pathrouter";
//@ts-ignore
import { resolvemdpathfromurl } from "./resolvemdpathfromurl";

export function scrolltobottom() {
    const md = resolvemdpathfromurl();
    const id = "bottom";

    if (process.env.PRERENDER) {
        hashrouter.setparams({ id });

        pathrouter.setparams({ md });
    } else {
        hashrouter.setparams({ md, id });
    }
    scrollTo(0, document.body.scrollHeight);
}
